<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button id="btn">点我一下</button>
    <ul id="list1">
        <li id="孙悟空">孙悟空</li>
        <li>猪八戒</li>
        <li>沙和尚</li>
    </ul>

    <ul id="list2">
        <li id="白骨精">白骨精</li>
    </ul>

    <script>
        const btn = document.getElementById("btn")

        btn.onclick = function(){
            const swk = document.getElementById("孙悟空")
            const ul2 = document.getElementById("list2")

            const swk2 = swk.cloneNode(true)
            swk2.id = "swk2"
            ul2.appendChild(swk2)
        }
    </script>
</body>
</html>